package com.jrx.anytxn.reporting.service;

import com.jrx.anytxn.common.exception.TxnBizException;
import com.jrx.anytxn.common.exception.TxnException;
import com.jrx.anytxn.customer.entity.CmCustomerContactInfo;
import com.jrx.anytxn.customer.entity.CmCustomerFirstLevel;
import com.jrx.anytxn.customer.entity.CmCustomerSecondLevel;
import com.jrx.anytxn.transaction.entity.TlThirdPartyPayment;

import java.util.List;

/**
 * 临商第二代征信文件处理 Service
 *
 * @author liuyang
 * @date 2021-04-26
 */
public interface ILSSecondFileService {

    /**
     * 生成个人借据信息
     *
     * @param loanId
     * @return String
     * @author liuyang
     * @date 2021-04-26
     */
    String createLSSecondAccountFileMessage(String loanId) throws TxnException;

    /**
     * 生成还款流水
     *
     * @param tlThirdPartyPayment
     * @return String
     * @author liuyang
     * @date 2021-04-26
     */
    String createLSSecondThirdPaymentFileMessage(TlThirdPartyPayment tlThirdPartyPayment) throws TxnBizException;

    /**
     * 生成个人信息
     *
     * @param cmCustomerFirstLevel
     * @return String
     * @author liuyang
     * @date 2021-04-26
     */
    String createLSSecondCustFileMessage(CmCustomerFirstLevel cmCustomerFirstLevel) throws TxnBizException;

    /**
     * 生成还款计划
     *
     * @param planId
     * @return String
     * @author liuyang
     * @date 2021-04-26
     */
    String createLSSecondRepaymentFileMessage(Long planId) throws TxnBizException;

    /**
     * 生成特殊交易
     *
     * @param tlThirdPartyPayment
     * @return String
     * @author liuyang
     * @date 2021-04-26
     */
    String createLSSecondSpecialTranFileMessage(TlThirdPartyPayment tlThirdPartyPayment) throws TxnBizException;

    /**
     * 生成个人合同信息
     *
     * @param loanId
     * @return String
     * @author liuyang
     * @date 2021-04-26
     */
    String createLSSecondContractFileMessage(String loanId) throws TxnBizException;

    /**
     * 个人相关还款责任人信息
     *
     * @param loanId
     * @return String
     * @author liuyang
     * @date 2021-04-26
     */
    String createLSSecondRltRepymtInfoFileMessage(String loanId) throws TxnBizException;

    /**
     * 生成个人关联信息
     *
     * @param cmCustomerFirstLevel
     * @return String
     * @author liuyang
     * @date 2021-04-26
     */
    List<String> createLSSecondCustContactFileMessage(CmCustomerFirstLevel cmCustomerFirstLevel) throws TxnBizException;

    /**
     * 临商二代征信文件合并
     *
     * @param sourcePath
     * @param outPath
     * @throws TxnException
     * @author liuyang
     * @date 2021-05-07
     */
    void mergeLSSecondFile(String sourcePath, String outPath) throws TxnException;
}
